namespace ContractorTimesheet.DataModel
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;

    [Table("Leave")]
    public partial class Leave
    {
        public Leave() : this(0, "", "", "", "") { }

        public Leave(int userId, string year, string month, string day, string note)
        {
            UserId = userId;
            Year = year;
            Month = month;
            Day = day;
            Note = note;
        }

        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [Required]
        [StringLength(4)]
        public string Year { get; set; }

        [Required]
        [StringLength(2)]
        public string Month { get; set; }

        [Required]
        [StringLength(2)]
        public string Day { get; set; }

        public int UserId { get; set; }

        [StringLength(100)]
        public string Note { get; set; }

        public virtual User User { get; set; }

    }
}
